package com.test.date;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 *参考：
 * android.text.format.DateUtils
 * android.text.format.Time
 *
 */
public class DateTool
{
	/**
	 * "2012-12-06"
	 */
	private static final String date_format = "yyyy-MM-dd";
	
	private static final String time_format = "yyyy-MM-dd HH:mm:ss";

	
	
	public static void main(String[] args)
	{
	     
		
		 String str = getTodayString();
		 System.out.println(str);
	}



	/**
	 **
	 *{@link #date_format}
	 *
	 */
	private static String getTodayString()
	{
//		SimpleDateFormat非线程安全
		SimpleDateFormat sf = new SimpleDateFormat(date_format);
	    String str = sf.format(Calendar.getInstance().getTime());
		return str;
	}
}
